package org.springframework.aop.org.springframework.aop.framework.aspectj;

import org.aopalliance.aop.Advice;

/**
 * @author admin
 */
public class AspectExpressionPointcutAdvisor {

    private AspectExpressionPointcut pointcut;

    private String expression;

    private Advice advice;

    public AspectExpressionPointcutAdvisor(String expression) {
        this.expression = expression;
    }

    public AspectExpressionPointcut getPointcut() {
        if (pointcut == null) {
            pointcut = new AspectExpressionPointcut(expression);
        }
        return pointcut;
    }

    public void setAdvice(Advice advice) {
        this.advice = advice;
    }

    public Advice getAdvice() {
        return advice;
    }
}
